package utils;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.config.IniSecurityManagerFactory;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.subject.Subject;

public class ShiroUtils {
    public static Subject getSubject(String iniResourcePath){
        SecurityManager manager = new IniSecurityManagerFactory
                (iniResourcePath).getInstance();
        SecurityUtils.setSecurityManager(manager);
        return SecurityUtils.getSubject();
}
}
